<?php 
class inside extends Controller {

var $data_view		 		= '';

var	$title					= '';
var	$tags					= '';
var	$description			= ''; 

function inside()
	{
		parent::Controller();
		session_start();
		$this->load->database();
		$this->load->helper('ap_db');
		$this->load->helper('ap_object');
		$this->load->helper('ap_function');
		$this->load->helper('ap_view');
		$this->load->helper('ap_module');
		
		$this->load->language('ap', 'eng');
	
	}

// Dinh nghia ham rut gon khi set cookie cho cac bien.
//
private function f_set_cookie($cookie_name,$cookie_value)
 { 
	return dbset_cookie('cookie_inside_'.$cookie_name,$cookie_value);
 }
 
// Dinh nghia ham rut gon khi get cookie cho cac bien.
//
private function f_get_cookie($cookie_name)
 { 
	return dbget_cookie('cookie_inside_'.$cookie_name);
 }
	
// Dinh nghia ham rut gon khi set language cho cac label.
// 
private function m_language_key($str_key)
	{
		return $this->lang->line('lbl.inside.'.$str_key);
	}


function index()
	{
		$this->do_process();
	}
	
function do_process() 
	{
		$this->get_data(); 		
		$this->caculate_data(); 		
		$this->do_business(); 		
		$this->destroy_data();
	}
	
private function get_data()
	{  
		
	}
	
private function caculate_data()
	{
		// Get title page
		 $obj_data = get_config_byid(3);
		 foreach($obj_data as $data):
		 	$this->title	= $data['cvalue'];
		 endforeach;
		 
		 // Get keyword page
		 $obj_data = get_config_byid(2);
		 foreach($obj_data as $data):
		 	$this->tags		= $data['cvalue'];
		 endforeach;
		 
		  // Get description page
		 $obj_data = get_config_byid(4);
		 foreach($obj_data as $data):
		 	$this->description		= $data['cvalue'];
		 endforeach;
	}
	
private function do_business()
	{	

		$data['title']			= $this->title;
		$data['tags']			= $this->tags;
		$data['description']	= $this->description;
		
		$data['nid_cat_work']		= '';
		$data['nid_sec_work']		= '';
		
		$data['menu_top']			= '';
		
		$data['data_view'] 		= $this->data_view;
		$data['g_ishome']		= 0;
		$this->load->view('inside',$data);	
	}
	
private function destroy_data()
	{
				
	}


}